//2009/10/23 17:31:08
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class WordCompositionGame
{
public:
    string score(vector <string> listA, vector <string> listB, vector <string> listC)
    {
        int s1 = 0;
        int s2 = 0;
        int s3 = 0;
        string ret;
        for (int i=0; i<listA.size(); i++)
        {
            int temp = 0;
            for (int j=0; j<listB.size(); j++)
                if (listB[j] == listA[i])
                {
                    temp++;
                    break;
                }
            for (int j=0; j<listC.size(); j++)
            	if (listC[j] == listA[i]) 
				{
					temp++;
					break;
				}
            s1 += 3 - temp;
        }
		stringstream x;
        x.clear();
		x << s1;
        ret += x.str();
        ret += '/';
        for (int i=0; i<listB.size(); i++)
        {
            int temp = 0;
            for (int j=0; j<listA.size(); j++)
                if (listB[i] == listA[j])
                {
                    temp++;
                    break;
                }
            for (int j=0; j<listC.size(); j++)
            	if (listC[j] == listB[i]) 
				{
					temp++;
					break;
				}
            s2 += 3 - temp;
        }
		stringstream xx;
		xx.clear();
		xx << s2;
        ret += xx.str();
        ret += '/';
        for (int i=0; i<listC.size(); i++)
        {
            int temp = 0;
            for (int j=0; j<listB.size(); j++)
                if (listB[j] == listC[i])
                {
                    temp++;
                    break;
                }
            for (int j=0; j<listA.size(); j++)
            	if (listC[i] == listA[j]) 
				{
					temp++;
					break;
				}
            s3 += 3 - temp;
        }
		stringstream xxx;
        xxx.clear();
		xxx << s3;
        ret += xxx.str();
        //ret += '/';
        return ret;
    }
};
